Skip to content

Don't let a Working Set that failed to parse block another one - #980

Open
gunicsba wants to merge 1 commit into
Open-Agriculture:mainfrom
gunicsba:fix/vt-failed-working-set-id
Open

gunicsba wants to merge 1 commit into
Open-Agriculture:mainfrom
gunicsba:fix/vt-failed-working-set-id

Conversation

@gunicsba

Copy link
Copy Markdown
Member

Fixes #954.

parse_next_object() set workingSetID as soon as it saw a Working Set object, before it parsed the rest of it. If that Working Set then failed to parse, it never got into the object tree, but workingSetID kept its ID. A later Working Set with another ID was then refused with "Multiple working set objects are not allowed in the object pool", although the pool had no other Working Set.

For example: a client uploads a pool whose Working Set 1 is truncated, and gets an error. It fixes the pool, and the Working Set now has ID 2. The server refuses it until the pool is deleted.

workingSetID is now set only once the Working Set has parsed and is in the object tree. ISO 11783-6:2018 B.1 allows one Working Set object per pool, and a second Working Set after one that parsed is still refused.

Test: WorkingSetThatFailedToParseDoesNotBlockAnotherOne parses a truncated Working Set 1, then a valid Working Set 2, then a Working Set 3. Working Set 2 is accepted, and 3 is still refused.

🤖 Generated with Claude Code

The Working Set ID was stored before the object parsed, so after a
failure a later Working Set with another ID was refused as a second
one. The ID is now stored once the Working Set is in the object tree.

Fixes Open-Agriculture#954

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A Working Set that fails to parse blocks a later one with a different ID

1 participant